package com.server.systems;

import java.rmi.RemoteException;
import java.util.ArrayList;

import combat.protocol.data.PhysicalObject;
import combat.protocol.data.RemoteList;
import combat.protocol.interfaces.OnboardSensorSystemInt;
import combat.protocol.types.OnboardSystemStatus;
import combat.protocol.types.OnboardSystemType;
import combat.protocol.types.SensorSystemType;


public class sensorSystemImpl extends onBoardSystemImpl implements OnboardSensorSystemInt {
	private static final long serialVersionUID = 5318119427815500634L;
	
	private int range = 40;
	private SensorSystemType sensorSystemType = SensorSystemType.UNKNOWN;

	public sensorSystemImpl() {
		super(OnboardSystemStatus.ONLINE, OnboardSystemType.SENSOR);
	}

	public sensorSystemImpl(int range, SensorSystemType sensorSystemType) {
		super(OnboardSystemStatus.ONLINE, OnboardSystemType.SENSOR);
		setRange(range);
		setSensorSystemType(sensorSystemType);
	}

	public int getRange() {
		return range;
	}

	public void setRange(int range) {
		this.range = range;
	}

	public SensorSystemType getSensorSystemType() {
		return sensorSystemType;
	}

	public void setSensorSystemType(SensorSystemType sensorSystemType) {
		this.sensorSystemType = sensorSystemType;
	}

	public ArrayList<PhysicalObject> scan() {
		return null;
	}

	@Override
	public RemoteList scan_Remote() {
		try {
			return new RemoteList(scan());
		} catch (RemoteException e) {
			System.out.println("ERROR: Update scan function failed");
		}
		return new RemoteList();
	}
}
